<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/**
 * Description of logout
 *
 * @author Admin
 */

class logout extends MY_Controller
{
    
    function index()
    {
        $this->session->unset_userdata('user_id');
		$this->session->unset_userdata('root_admin');
        setcookie('username','');
        setcookie('password','');
        redirect(url_create('admin','login'));
    }
    
}

?>
